#include<iostream>
using namespace std;
typedef long long LL;
const int N = 13;
int n, k;
int cnt;
int s[1 << N];
int num[1 << N];
LL f[N][N * N][1 << N];
int main()
{
	cin >> n >> k;
	for (int i = 0; i < 1 << n; i++) {
		if (!(i & i >> 1)) {
			s[cnt++] = i;
			for (int j = 0; j < n; j++) {
				num[i] += (i >> j & 1);
			}
		}
	}
	f[0][0][0] = 1;
	for (int i = 1; i <= n + 1; i++) {
		for (int j = 0; j <= k; j++) {
			for (int a = 0; a < cnt; a++) {
				for (int b = 0; b < cnt; b++) {
					int c = num[s[a]];
					if (j >= c && !(s[a] & s[b]) &&
						!(s[b] & s[a] >> 1) && !(s[b] & s[a] << 1))
						f[i][j][a] += f[i - 1][j - c][b];
				}
			}
		}
	}
	/*LL ans = 0;
	for (int i = 0; i < 1 << n; i++) {
		ans += f[n][k][i];
	}
	cout << ans << endl;*/
	cout << f[n + 1][k][0] << endl;
	return 0;
}